import request from '@/utils/axios'
var qs = require('qs');

export function getGameList(params) {
  return request({
    url: '/gameManage/list',
    method: 'get',
    params: params
  });
}
// 获取游戏下拉列表
export function getSearchList(params) {
  return request({
    url: '/gameManage/cpGameName',
    method: 'get',
    params: params,
  });
}
// 获取游戏下拉列表
export function getOptionList(params) {
  return request({
    url: '/Gameserver/cpgameName',
    method: 'get',
    params: params,
  });
}
// 获取安卓游戏下拉列表

export function getAndroidList(params) {
  return request({
    url: '/gameManage/cpAndroidGameName',
    method: 'get',
    params: params,
  });
}
// 添加视频
export function addpromtoVideo(params) {
  return request({
    url: "/gameManage/addVideo",
    method: "post",
    data: qs.stringify(params)
  })
}
// 添加游戏
export function addgame(params) {
  return request({
    url: "/gameManage/add",
    method: "post",
    data: qs.stringify(params),
  })
}
// 点击游戏列表的编辑按钮
export function getEditgameList(params) {
  return request({
    url: "/gameManage/edit",
    method: "get",
    params
  })
}
// 提交编辑游戏表单
export function submitEditForm(params) {
  return request({
    url: "/gameManage/submitEditform",
    method: "get",
    params
  })
}

// 提交审核
export function submitAudit(params) {
  return request({
    url: "/gameManage/submitAudit",
    method: "get",
    params
  })
}
// 添加回调地址
export function addRecharge(params) {
  return request({
    url: "/gameManage/addCpCallbackUrl",
    method: "post",
    data: qs.stringify(params)
  })
}
// 查看回调参数
export function showgameParam(params) {
  return request({
    url: "/gameManage/gameParam",
    method: "get",
    params
  })
}
// 上传文件
export function uploadFile(params) {
  return request({
    url: "/uploadFile",
    method: "post",
    data: qs.stringify(params),
  })
}
// 添加新游戏获取关联游戏
export function getlinkGame(params) {
  return request({
    url: "/gameManage/cpRelationGameList",
    method: "get",
    params
  })
}
// 保存编辑信息
export function saveEditMessage(params) {
  return request({
    url: "/gameManage/editPost",
    method: "post",
    data: qs.stringify(params)
  })
}
